class Store implements RtlInsn {
    private RtlType type;
    private Temp addr;
    private Temp val;

    public Store (RtlType _type, Temp _addr, Temp _val){
	type =_type;
	addr =_addr;
	val =_val;
    }

    public RtlType getType (){
	return type;
    }

    public void setType (RtlType _type){
	type =_type;
    }

    public Temp getAddr (){
	return addr;
    }

    public void setAddr (Temp _addr){
	addr =_addr;
    }

    public Temp getVal (){
	return val;
    }

    public void setVal (Temp _val){
	val =_val;
    }

    public String toString(){
	return "store" + "(" + type + " " + 
	    addr + " " + val + ")";
    }

    public RtlInstrId getRtlId()
    {
	switch(type)
	{
	case BYTE:
	    return RtlInstrId.STORE_BYTE;
		
	case LONG:
	    return RtlInstrId.STORE_WORD;
		
	default:
	    //TODO. Fix later. throw new NoSuchFieldException();
	    return null;
	}
    }
}


